<template>
	 <view class="">
		 <cover-view>
		   <web-view src="http://192.168.2.33:8080/house/#/pages/test"></web-view>
		 </cover-view>
	 <!-- 	<map style="width: 100%; height: 800px;" :latitude="latitude" :longitude="longitude" :radius="50" fillColor="#ffc933" color="#1b98e3"
	 		:enable-satellite="true" :enable-overlooking="true" :enable-building="true" :circles="circles"
	 		:markers="covers" :rotate="rotate" :enable-indoorMap="true" :enable-3D="true" theme="satellite">
	 	</map> -->
		<u-toast ref="uToast"></u-toast>
	 </view>
</template>

<script>
	export default {
		data() {
			return {
				value: 1,
				id: 1, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: 31.289913,
				longitude: 121.11985, // 121.10601
				rotate: 360,
				circles: [{
					latitude: 31.289913,
					longitude: 121.11985,
					color: '#54C3FF',
					fillColor: '#A3FF746A',
					radius: 1500,
					strokeWidth: 1
				}],
				covers: [{
						id: 1,
						latitude: 31.289905,
						longitude: 121.11060,
						iconPath: '../../static/position/fiexd.png',
						callout: {
							content: "示例1",
							color: "#fff",
							fontSize: 20,
							borderRadius: 10,
							borderColor: "#000",
							bgColor: "#1ba035",
							padding: 10,
							display: "ALWAYS",
							textAlign: "center",
						},
						lable: {
							title: "title_test",
							color: "#eee",
							fontSize: 20,
							padding: 10,

						},
					},
					{
						id: 1,
						latitude: 31.289911,
						longitude: 121.11985,
						callout: {
							content: "示例2",
							color: "#fff",
							fontSize: 20,
							borderRadius: 10,
							borderColor: "#000",
							bgColor: "#1ba035",
							padding: 10,
							display: "ALWAYS",
							textAlign: "center",
						},
						iconPath: '../../static/position/fiexd.png'
					},
					{
						id: 1,
						latitude: 31.281911,
						longitude: 121.10985,
						iconPath: '../../static/position/fiexd.png'
					},
					{
						id: 3,
						latitude: 33.239913,
						longitude: 123.10185,
						iconPath: '../../static/position/fiexd.png'
					},
					{
						id: 1,
						latitude: 32.126613,
						longitude: 123.11285,
						iconPath: '../../static/position/fiexd.png'
					},
					{
						id: 1,
						latitude: 31.126613,
						longitude: 122.15185,
						iconPath: '../../static/position/fiexd.png'
					},
					{
						id: 1,
						latitude: 30.219913,
						longitude: 121.19185,
						iconPath: '../../static/position/fiexd.png'
					},
					{
						id: 1,
						latitude: 29.219913,
						longitude: 122.17185,
						iconPath: '../../static/position/fiexd.png'
					},
					{
						id: 1,
						latitude: 28.280913,
						longitude: 126.19185,
						iconPath: '../../static/position/fiexd.png'
					},
					{
						id: 1,
						latitude: 29.215513,
						longitude: 122.80185,
						iconPath: '../../static/position/fiexd.png'
					}
				]

			}
		},
		onLoad() {
			var that = this
			uni.getLocation({
				type: 'wgs84',
				geocode: true, //设置该参数为true可直接获取经纬度及城市信息
				success: function(res) {
				
					// that.latitude = res.latitude
					// that.longitude = res.longitude
					// that.circles[0].latitude = res.latitude
					// that.circles[0].longitude = res.longitude
					// that.covers[0].latitude = res.latitude
					// that.covers[0].longitude = res.longitude
					// that.addrDel = res;
				},
				fail: function() {
					this.$refs.uToast.show({
						message: '获取地址失败，将导致部分功能不可用',
						type: 'error'
					})
					// uni.showToast({
					// 	title: '获取地址失败，将导致部分功能不可用',
					// 	icon: 'none'
					// });
				}
			});
		}
	}
</script>

<style>
   .map_box1234 {
	   width: 100%;
	   height: 100vh;
   }	 
</style>